package com.vito.framework.system.role.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vito.framework.base.model.Entity;
import com.vito.framework.system.menu.model.MenuBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_role")
@ApiModel(value = "sys_role对象", description = "系统角色表")
public class RoleBean extends Entity<RoleBean> {
    /**
     * 保存到session必须序列化
     */
    private static final long serialVersionUID = 994932429839752798L;
    /**
     * roleName 角色名称<br>
     * roleId 角色ID<br>
     * orgId SP标识<br>
     * roleType 角色类型<br>
     * userId 用户编号<br>
     * menuSet 对应菜单集合<br>
     * menuIds 对应菜单号集合<br>
     */
    @TableId("role_id")
    @ApiModelProperty("角色编号")
    private String roleId;

    @TableField("role_name")
    @ApiModelProperty("角色名称")
    private String roleName;

    @TableField("org_id")
    @ApiModelProperty("企业编号")
    private String orgId;

    @TableField(exist = false)
    @ApiModelProperty("企业名称")
    private String orgName;

    @TableField("user_id")
    @ApiModelProperty("用户标识")
    private String userId;

    @TableField("role_type")
    @ApiModelProperty("0系统角色 1业务角色")
    private String roleType;

    @TableField("opdate")
    @ApiModelProperty("操作时间")
    private String opdate;

    @TableField("operator")
    @ApiModelProperty("操作员")
    private String operator;

    @TableField(exist = false)
    private String[] menuIds;

    @TableField(exist = false)
    private String[] roleIds;

    @TableField(exist = false)
    private String[] selectRole;

    @TableField(exist = false)
    private String[] addRole;

    @TableField(exist = false)
    private String[] updateRole;

    @TableField(exist = false)
    private String[] deleteRole;

    @TableField(exist = false)
    private String[] importRole;

    @TableField(exist = false)
    private String[] exportRole;

    @TableField(exist = false)
    private List<MenuBean> menuSet;

    @TableField(exist = false)
    private String menuType;

    @TableField(exist = false)
    @ApiModelProperty("menuTypeName是教师角色用的到字段")
    private String menuTypeName;
}
